import Vue from 'vue'
import VueRouter from 'vue-router'

// 引入五个人的路由配置
import guyajie from './guyajie/index.js'
import linzhengzhou from './linzhengzhou/index.js'
import liyihao from './liyihao/index.js'
import weidong from './weidong/index.js'
import zhangmengru from './zhangmengru/index.js'

Vue.use(VueRouter)

const routes = [

  // {
  //   path: '/about',
  //   name: 'about',
  //   component: () => import('../views/AboutView.vue')
  // }

  //引入五个人的路由配置
  ...guyajie,
  ...linzhengzhou,
  ...liyihao,
  ...weidong,
  ...zhangmengru,


  // 重定向
  {
    path: "/",
    redirect: "/homepage"
  },

  // 404页面必须在所有规则的最下面
  {
    path: '*',
    name: 'NoView',  //404页面的名字
    component: () => import('../views/NoView.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
